<pre>  /**
   * The UiBinder interface used by this example.
   */
  interface Binder extends UiBinder&lt;Widget, CwCellTable&gt; {
  }

  /**
   * The constants used in this Content Widget.
   */
  public static interface CwConstants extends Constants {
    String cwCellTableColumnAddress();

    String cwCellTableColumnCategory();

    String cwCellTableColumnFirstName();

    String cwCellTableColumnLastName();

    String cwCellTableDescription();

    String cwCellTableName();
  }

  /**
   * The main CellTable.
   */
  @UiField(provided = true)
  CellTable&lt;ContactInfo&gt; cellTable;

  /**
   * The pager used to change the range of data.
   */
  @UiField(provided = true)
  SimplePager pager;

  /**
   * An instance of the constants.
   */
  private final CwConstants constants;

  /**
   * Initialize this example.
   */
  @Override
  public Widget onInitialize() {
    // Create a CellTable.

    // Set a key provider that provides a unique key for each contact. If key is
    // used to identify contacts when fields (such as the name and address)
    // change.
    cellTable = new CellTable&lt;ContactInfo&gt;(
        ContactDatabase.ContactInfo.KEY_PROVIDER);
    cellTable.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    cellTable.setAutoHeaderRefreshDisabled(true);
    cellTable.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ListHandler&lt;ContactInfo&gt; sortHandler = new ListHandler&lt;ContactInfo&gt;(
        ContactDatabase.get().getDataProvider().getList());
    cellTable.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(cellTable);

    // Add a selection model so we can select cells.
    final SelectionModel&lt;ContactInfo&gt; selectionModel = new MultiSelectionModel&lt;ContactInfo&gt;(
        ContactDatabase.ContactInfo.KEY_PROVIDER);
    cellTable.setSelectionModel(selectionModel,
        DefaultSelectionEventManager.&lt;ContactInfo&gt; createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    ContactDatabase.get().addDataDisplay(cellTable);

    // Create the UiBinder.
    Binder uiBinder = GWT.create(Binder.class);
    Widget widget = uiBinder.createAndBindUi(this);

    return widget;
  }

  /**
   * Add the columns to the table.
   */
  private void initTableColumns(
      final SelectionModel&lt;ContactInfo&gt; selectionModel,
      ListHandler&lt;ContactInfo&gt; sortHandler) {
    // Checkbox column. This table will uses a checkbox column for selection.
    // Alternatively, you can call cellTable.setSelectionEnabled(true) to enable
    // mouse selection.
    Column&lt;ContactInfo, Boolean&gt; checkColumn = new Column&lt;ContactInfo, Boolean&gt;(
        new CheckboxCell(true, false)) {
      @Override
      public Boolean getValue(ContactInfo object) {
        // Get the value from the selection model.
        return selectionModel.isSelected(object);
      }
    };
    cellTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("&lt;br/&gt;"));
    cellTable.setColumnWidth(checkColumn, 40, Unit.PX);

    // First name.
    Column&lt;ContactInfo, String&gt; firstNameColumn = new Column&lt;ContactInfo, String&gt;(
        new EditTextCell()) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getFirstName();
      }
    };
    firstNameColumn.setSortable(true);
    sortHandler.setComparator(firstNameColumn, new Comparator&lt;ContactInfo&gt;() {
      @Override
      public int compare(ContactInfo o1, ContactInfo o2) {
        return o1.getFirstName().compareTo(o2.getFirstName());
      }
    });
    cellTable.addColumn(firstNameColumn, constants.cwCellTableColumnFirstName());
    firstNameColumn.setFieldUpdater(new FieldUpdater&lt;ContactInfo, String&gt;() {
      @Override
      public void update(int index, ContactInfo object, String value) {
        // Called when the user changes the value.
        object.setFirstName(value);
        ContactDatabase.get().refreshDisplays();
      }
    });
    cellTable.setColumnWidth(firstNameColumn, 20, Unit.PCT);

    // Last name.
    Column&lt;ContactInfo, String&gt; lastNameColumn = new Column&lt;ContactInfo, String&gt;(
        new EditTextCell()) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getLastName();
      }
    };
    lastNameColumn.setSortable(true);
    sortHandler.setComparator(lastNameColumn, new Comparator&lt;ContactInfo&gt;() {
      @Override
      public int compare(ContactInfo o1, ContactInfo o2) {
        return o1.getLastName().compareTo(o2.getLastName());
      }
    });
    cellTable.addColumn(lastNameColumn, constants.cwCellTableColumnLastName());
    lastNameColumn.setFieldUpdater(new FieldUpdater&lt;ContactInfo, String&gt;() {
      @Override
      public void update(int index, ContactInfo object, String value) {
        // Called when the user changes the value.
        object.setLastName(value);
        ContactDatabase.get().refreshDisplays();
      }
    });
    cellTable.setColumnWidth(lastNameColumn, 20, Unit.PCT);

    // Category.
    final Category[] categories = ContactDatabase.get().queryCategories();
    List&lt;String&gt; categoryNames = new ArrayList&lt;String&gt;();
    for (Category category : categories) {
      categoryNames.add(category.getDisplayName());
    }
    SelectionCell categoryCell = new SelectionCell(categoryNames);
    Column&lt;ContactInfo, String&gt; categoryColumn = new Column&lt;ContactInfo, String&gt;(
        categoryCell) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getCategory().getDisplayName();
      }
    };
    cellTable.addColumn(categoryColumn, constants.cwCellTableColumnCategory());
    categoryColumn.setFieldUpdater(new FieldUpdater&lt;ContactInfo, String&gt;() {
      @Override
      public void update(int index, ContactInfo object, String value) {
        for (Category category : categories) {
          if (category.getDisplayName().equals(value)) {
            object.setCategory(category);
          }
        }
        ContactDatabase.get().refreshDisplays();
      }
    });
    cellTable.setColumnWidth(categoryColumn, 130, Unit.PX);

    // Address.
    Column&lt;ContactInfo, String&gt; addressColumn = new Column&lt;ContactInfo, String&gt;(
        new TextCell()) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getAddress();
      }
    };
    addressColumn.setSortable(true);
    addressColumn.setDefaultSortAscending(false);
    sortHandler.setComparator(addressColumn, new Comparator&lt;ContactInfo&gt;() {
      @Override
      public int compare(ContactInfo o1, ContactInfo o2) {
        return o1.getAddress().compareTo(o2.getAddress());
      }
    });
    cellTable.addColumn(addressColumn, constants.cwCellTableColumnAddress());
    cellTable.setColumnWidth(addressColumn, 60, Unit.PCT);
  }

</pre>